import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

// 引入footer下的文件
import HostShow from '../views/home/HostShow'
import Cinema from '../views/home/Cinema'
import Mine from '../views/home/Mine'

import NowShow from '../views/home/hostshow/NowShow'
import FuterShow from '../views/home/hostshow/FuterShow'


import City from '../views/City'
import Search from '../views/Search'
import Detail from '../views/Detail'

Vue.use(VueRouter)

  const routes = [
  {
    path: '/',
    redirect:'/home/hostshow/nowshow'
  },
  {
    path:'/home',
    component:Home,
    children:[
      {
        path:'hostshow',
        component:HostShow,
        children:[
          {
            path:'nowshow',
            component:NowShow
          },
          {
            path:'futershow',
            component:FuterShow
          }
        ]

      },
      {
        path:'cinema',
        component:Cinema
      },
      {
        path:'mine',
        component:Mine
      }
    ]
  },
  {
    path:'/city',
    component:City
  },
  {
    path:'/detail',
    name:'detail',
    component:Detail
  },
  {
    path:'/search',
    component:Search
  }
  
 
]

const router = new VueRouter({
  routes
})

export default router
